package com.eighth.strategy;


import com.eighth.strategy.factory.SaveFactory;
import com.eighth.strategy.factory.Type;


public class Test {
    public static void main(String[] args) {
        ISave save3 = SaveFactory.getSave(Type.DB);
        ISave save1 = SaveFactory.getSave(Type.FILE);
        ISave save2 = SaveFactory.getSave(Type.NET);
        // 策略
        if (save1 != null) {
            Context context = new Context(save1);
            context.save();
        }
    }
}
